#ifndef IO_FILTER_H
#define IO_FILTER_H
#include "message_context.h"
namespace vpm
{
	namespace mina
	{
		class IoFilter
		{
		public:
			enum FilterType
			{
				CHAIN_NONE_FILTER=0,
				CHAIN_IN_FILTER,
				CHAIN_OUT_FILTER,		
			} ;

			enum FilterAction
			{
				CONTINUE, // move onto the next Processor
				WAITFOREVENT, // stop Processor chain and wait for async response
				SKIPTHISCHAIN,
				SKIPALLCHAINS,
			};

			IoFilter(FilterType type = CHAIN_NONE_FILTER):m_filterType(type)
			{

			}
			
			virtual ~IoFilter()
			{
			}

			virtual FilterAction process(MessageContext & )= 0; 


			void filter_type(FilterType type)
			{
				m_filterType = type; 
			}

			FilterType filter_type()
			{
				return m_filterType; 
			}

		private:
			FilterType m_filterType; 

		};
	}
}


#endif // IO_FILTER_H
  
